package com.tarena.test.lbs.basic.threadlocal;

public class MyFilter {

    private MyDispatcherServlet servlet = new MyDispatcherServlet();
    public void doFilter(){
        System.out.println("MyFilter doFilter");
        //通过过滤器逻辑执行完 生成了一个数据 String name
        String name = "lzy";
        //使用ThreadLocal 存数据 key值是当前线程 value值是name
        NameThreadLocal.save(name);
        servlet.doDispatch();
    }
}
